// license-header java merge-point
/**
 * This is only generated once! It will never be overwritten.
 * You can (and have to!) safely modify it by hand.
 */
package org.tinaelle.server.domain;
/**
 * @see org.tinaelle.server.domain.AdReferenceTrl
 */
public class AdReferenceTrlDaoImpl
    extends org.tinaelle.server.domain.AdReferenceTrlDaoBase
{
    /**
     * @see org.tinaelle.server.domain.AdReferenceTrlDao#toAdReferenceTrlDTO(org.tinaelle.server.domain.AdReferenceTrl)
     */
    public org.tinaelle.common.dto.AdReferenceTrlDTO toAdReferenceTrlDTO(final org.tinaelle.server.domain.AdReferenceTrl entity)
    {
        return super.toAdReferenceTrlDTO(entity);
    }

    /**
     * Retrieves the entity object that is associated with the specified value object
     * from the object store. If no such entity object exists in the object store,
     * a new, blank entity is created
     */
    private org.tinaelle.server.domain.AdReferenceTrl loadAdReferenceTrlFromAdReferenceTrlDTO(org.tinaelle.common.dto.AdReferenceTrlDTO adReferenceTrlDTO)
    {
        org.tinaelle.server.domain.AdReferenceTrl adReferenceTrl = this.load(adReferenceTrlDTO.getAdReferenceTrlId());
        if (adReferenceTrl == null)
        {
            adReferenceTrl = org.tinaelle.server.domain.AdReferenceTrl.Factory.newInstance();
        }
        return adReferenceTrl;
    }

    
    /**
     * @see org.tinaelle.server.domain.AdReferenceTrlDao#adReferenceTrlDTOToEntity(org.tinaelle.common.dto.AdReferenceTrlDTO)
     */
    public org.tinaelle.server.domain.AdReferenceTrl adReferenceTrlDTOToEntity(org.tinaelle.common.dto.AdReferenceTrlDTO adReferenceTrlDTO)
    {
        org.tinaelle.server.domain.AdReferenceTrl entity = this.loadAdReferenceTrlFromAdReferenceTrlDTO(adReferenceTrlDTO);
        this.adReferenceTrlDTOToEntity(adReferenceTrlDTO, entity, true);
        return entity;
    }
}